package com.ag.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbSchedId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbSchedId implements java.io.Serializable {

	// Fields

	private Date scTime;
	private String dsName;
	private String duId;
	private String UId;

	// Constructors

	/** default constructor */
	public TbSchedId() {
	}

	/** full constructor */
	public TbSchedId(Date scTime, String dsName, String duId, String UId) {
		this.scTime = scTime;
		this.dsName = dsName;
		this.duId = duId;
		this.UId = UId;
	}

	// Property accessors
	@Temporal(TemporalType.DATE)
	@Column(name = "SC_TIME", nullable = false, length = 23)
	public Date getScTime() {
		return this.scTime;
	}

	public void setScTime(Date scTime) {
		this.scTime = scTime;
	}

	@Column(name = "DS_NAME", nullable = false, length = 10)
	public String getDsName() {
		return this.dsName;
	}

	public void setDsName(String dsName) {
		this.dsName = dsName;
	}

	@Column(name = "DU_ID", nullable = false, length = 20)
	public String getDuId() {
		return this.duId;
	}

	public void setDuId(String duId) {
		this.duId = duId;
	}

	@Column(name = "U_ID", nullable = false, length = 50)
	public String getUId() {
		return this.UId;
	}

	public void setUId(String UId) {
		this.UId = UId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbSchedId))
			return false;
		TbSchedId castOther = (TbSchedId) other;

		return ((this.getScTime() == castOther.getScTime()) || (this
				.getScTime() != null
				&& castOther.getScTime() != null && this.getScTime().equals(
				castOther.getScTime())))
				&& ((this.getDsName() == castOther.getDsName()) || (this
						.getDsName() != null
						&& castOther.getDsName() != null && this.getDsName()
						.equals(castOther.getDsName())))
				&& ((this.getDuId() == castOther.getDuId()) || (this.getDuId() != null
						&& castOther.getDuId() != null && this.getDuId()
						.equals(castOther.getDuId())))
				&& ((this.getUId() == castOther.getUId()) || (this.getUId() != null
						&& castOther.getUId() != null && this.getUId().equals(
						castOther.getUId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getScTime() == null ? 0 : this.getScTime().hashCode());
		result = 37 * result
				+ (getDsName() == null ? 0 : this.getDsName().hashCode());
		result = 37 * result
				+ (getDuId() == null ? 0 : this.getDuId().hashCode());
		result = 37 * result
				+ (getUId() == null ? 0 : this.getUId().hashCode());
		return result;
	}

}